    //Google maps
		var map;
    function loadMap() {

	  	if (GBrowserIsCompatible()) {
	        map = new GMap2(document.getElementById("map"));
			map.setCenter(new GLatLng(-2.065484, -79.656478), 7);			
			map.addControl(new GMapTypeControl());			
			map.addControl(new GLargeMapControl());
			map.addControl(new GScaleControl());
			map.addControl(new GOverviewMapControl());
			map.setMapType(G_NORMAL_MAP);
			
			var point = new GPoint (-4,40);
			var marker = new GMarker(point);
			map.addOverlay(marker);
		
			GEvent.addListener(map, "click", function (overlay,point){
			if (point){
				marker.setPoint(point);
                var longitud = document.getElementById("longitud");
                var latitud = document.getElementById("latitud");

                latitud.value = point.lat();
                longitud.value = point.lng();
				}
			});

//			var point = new GLatLng(-2.7565043855432503,-79.288330078125);
//			map.addOverlay(new GMarker(point));
		}
	}

	//Libreria de YUI
	YAHOO.namespace("example.container");

function init() {
	// Build overlay1 based on markup
	YAHOO.example.container.overlayMap = new YAHOO.widget.Overlay("map", {
										  visible:false,
										  width:"400px",
										  effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25} } );
	YAHOO.example.container.overlayMap.render("example");
}

YAHOO.util.Event.onDOMReady(init);

var showHideMap = function(){
        var divmap = document.getElementById("map");
        var divcontenedor = document.getElementById("contenedormap");

        if(divmap.style.visibility == 'visible'){
            YAHOO.example.container.overlayMap.hide();
            divcontenedor.style.display = 'none';
            document.getElementById("link_mapa").textContent = "Mostrar Mapa";
        }else{
            divcontenedor.style.display = 'block';
            YAHOO.example.container.overlayMap.show();
            document.getElementById("link_mapa").textContent = "Ocultar Mapa";
        }
    }

function showMapa(){
    YAHOO.example.container.overlayMap.show();
}

function addMarker(longitud, latitud){
    var point = new GLatLng(latitud,longitud);
    map.addOverlay(new GMarker(point));
}
